<?php
	session_start();
	//db connection
	require_once 'common/dbConnection.php';
	$dbConnection = new \common\DbConnection();
	$dbConnection->connect();
	
	//COMMON
	require_once 'common/bloggDAL.php';
	//MODEL
	require_once 'model/adminHandler.php';
	//CONTROLLER
	require_once 'controller/adminController.php';
	require_once 'controller/bloggController.php';
	require_once 'controller/homeController.php';
	require_once 'controller/masterController.php';
	//VIEW
	require_once 'view/adminView.php';
	require_once 'view/bloggView.php';
	require_once 'view/navigationView.php';
	require_once 'view/pageCompositionView.php';

	$bloggDAL = new \common\BloggDAL($dbConnection);
	$masterController = new \controller\MasterController($bloggDAL);
	$body = $masterController->doControll();
	
	//stänger kommunikationen med db
	$dbConnection->close();
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv">

	<head>
		<title>
			M Landerhjelm
		</title>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
	</head>
	<body>
		<div id="mainContent">
				<?php
					echo $body;
				?>

		</div>
	</body>
</html>


